;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2021 florhizome <florhizome@posteo.de>
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
;;; Copyright © 2022 Akib Azmain Turja <akib@disroot.org>
;;; Copyright © 2021, 2022 jgart <jgart@dismail.de>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages emacs)
  #:use-module (guix build-system emacs)
  #:use-module (guix build python-build-system)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix build utils)
  #:use-module (guix build emacs-utils)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages check)
  #:use-module (gnu packages cpp)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages emacs-xyz)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages rust-apps)
  #:use-module (gnu packages terminals)
  #:use-module (gnu packages emacs)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages webkit)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages gstreamer)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages erlang)
  #:use-module (gnu packages ocaml)
  #:use-module (gnu packages statistics)
  #:use-module (gnu packages video)
  #:use-module ((guixrus contributors) #:prefix contributor:)
  #:use-module ((guixrus licenses) #:prefix license:)
  #:use-module ((guixrus packages gcc) #:prefix rus:)
  #:use-module (ice-9 match))

(define-public emacs-edge
  (let ((commit "208f0578d1e523762c356895c21cde47f909fd7c")
        (revision "2")
        (libgccjit rus:libgccjit-11))
    (package
      (inherit emacs-next)
      (name "emacs-edge")
      (version (git-version "29.0.50" revision commit))
      (source
       (origin
         (method url-fetch)
         (uri (string-append
               "https://git.savannah.gnu.org/cgit/emacs.git/snapshot/"
               "emacs-" commit ".tar.gz"))
         (sha256
          (base32
           "1x96zp2s1gp8dswcpdcpdfrxzcqh1264x1c8bhnxnz6xyznp89vx"))))
      (arguments
       (substitute-keyword-arguments (package-arguments emacs-next)
         ((#:configure-flags flags ''())
          #~(cons*
             "--with-native-compilation"
             "--with-sqlite3"
             "--with-xinput2"
             "--with-xwidgets"
             #$flags))
         ((#:phases phases ''())
          #~(modify-phases #$phases
              ;; Required for configure to find libgccjit
              (add-before 'configure 'set-library-path
                (lambda* (#:key inputs #:allow-other-keys)
                  (let* ((libgccjit-version
                          #$(package-version
                             (this-package-input "libgccjit")))
                         (libgccjit-libdir
                          (string-append
                           #$(this-package-input "libgccjit")
                           "/lib/gcc/" %host-type "/" libgccjit-version)))
                    (setenv "LIBRARY_PATH"
                            (string-append libgccjit-libdir ":"
                                           (getenv "LIBRARY_PATH"))))
                  #t))
              ;; Add runtime library paths for libgccjit.
              (add-after 'unpack 'patch-driver-options
                (lambda* (#:key inputs #:allow-other-keys)
                  (substitute* "lisp/emacs-lisp/comp.el"
                    (("\\(defcustom native-comp-driver-options nil")
                     (format
                      #f "(defcustom native-comp-driver-options '(~s ~s ~s ~s)"
                      (string-append
                       "-B" #$(this-package-input "binutils") "/bin/")
                      (string-append
                       "-B" #$(this-package-input "glibc") "/lib/")
                      (string-append
                       "-B" #$(this-package-input "libgccjit") "/lib/")
                      (string-append
                       "-B" #$(this-package-input "libgccjit") "/lib/gcc/"))))
                  #t))))))
      (propagated-inputs
       (list gsettings-desktop-schemas glib-networking))
      (inputs
       (modify-inputs (package-inputs emacs-next)
         (prepend glibc)
         (prepend libgccjit)
         (prepend sqlite)
         (prepend webkitgtk-with-libsoup2)))
      (properties `((maintainers . (,contributor:akib)))))))

(define-public emacs-evil-next
  (package
    (inherit emacs-evil)
    (name "emacs-evil-next")
    (arguments
     `(#:emacs ,emacs
       #:phases
       (modify-phases %standard-phases
         ;; Here the \"28\" is a comment of a function lacking an
         ;; argument. Should be replaced upstream at some point.
         (add-after 'unpack 'fix-compilation-emacs-28
           (lambda _
             (mkdir-p "eln-cache")
             (setenv "EMACSNATIVELOADPATH" "eln-cache")
             (substitute* "evil-ex.el"
               (("  'comint-completion-at-point\\)")
                "  'comint-completion-at-point \"28\")"))))
         (add-before 'check 'fix-test-helpers
           (lambda _
             (substitute* "evil-test-helpers.el"
               (("\\(undo-tree-mode 1\\)") ""))))
         (add-before 'install 'make-info
           (lambda _
             (with-directory-excursion "doc/build/texinfo"
               (invoke "makeinfo" "--no-split"
                       "-o" "evil.info" "evil.texi")))))))
    (description
"Evil is an extensible vi layer for Emacs.  It emulates the main features
of Vim, and provides facilities for writing custom extensions. This
derivative package fixes the build for emacs28+ versions.")))

(define-public emacs-edge-pgtk
  (package
    (inherit emacs-edge)
    (name "emacs-edge-pgtk")
    (arguments
     (substitute-keyword-arguments (package-arguments emacs-edge)
       ((#:configure-flags flags ''())
        `(cons* "--with-pgtk" ,flags))))
    (synopsis "Emacs with pgtk support")
    (description "This package builds Emacs with pure GTK, meant for window systems
supported by GDK such as Wayland and Broadway. It is recommended that
use this package for such systems, unless you use X.")))

(define-public emacs-piem
  (let ((release "0.3.0")
        (revision "0")
        (commit "0a571f4d82ce3f9fa350130028d5f82886c08532"))
    (package
      (name "emacs-piem")
      (version (git-version release revision commit))
      (home-page "https://git.kyleam.com/piem")
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url home-page)
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "14cw44qphgnm9dfzvj5nfrw7ha4zs9z816flbg29xcl71ljrrgss"))))
      (build-system emacs-build-system)
      (native-inputs
       `(("texinfo" ,texinfo)))
      (inputs (list emacs-magit emacs-elfeed emacs-notmuch))
      (synopsis "Integrates git and email with Emacs")
      (description "@code{piem} is a collection of Emacs libraries for
 working with public-inbox archives.")
      (license license:gpl3+))))

(define-public emacs-redo-mode
  (package
    (name "emacs-redo-mode")
    (version "0.1.0")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/cemkeylan/redo-mode")
         (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "12g5a1hzxjhi0i4mbh5k88da7s4b574ajx68nw67i2jv3damksbx"))))
    (build-system emacs-build-system)
    (home-page "https://github.com/remvee/redo-mode")
    (synopsis "Simple Emacs major-mode for the redo build system")
    (description
"@code{emacs-redo-mode} provides a simple Emacs major-mode for the redo
build system.")
    (license license:gpl3+)))

(define-public emacs-elquery
  (package
    (name "emacs-elquery")
    (version "1.1.0")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/AdamNiederer/elquery")
         (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "035zjzmd7yfw0rsjpaklc2wwiqw6brkjadch9x8n8n2gjyxg05mn"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-dash))
    (home-page "https://github.com/AdamNiederer/elquery/")
    (synopsis "Read and manipulate HTML in Emacs")
    (description
"@code{emacs-elquery} is a library that lets you parse, query, set, and
format HTML using Emacs Lisp.  It implements most of the @code{querySelector}
API with @code{elquery-$}, and can get and set HTML attributes.")
    (license license:gpl3+)))

(define-public emacs-nice-defaults
  (package
    (name "emacs-nice-defaults")
    (version "0.2.1")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://git.sr.ht/~whereiseveryone/nice-defaults")
         (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0bkzbsm9knk9z2765798i1rnazzkmnw01cqpm2qg3jbm6lmr704m"))))
    (build-system emacs-build-system)
    (home-page "https://git.sr.ht/~whereiseveryone/nice-defaults")
    (synopsis "Nice defaults for Emacs")
    (description
"@code{emacs-nice-defaults} provides some nice defaults for Emacs.")
    (license license:gpl3+)))

(define-public emacs-meme
  (let ((commit "77b0f760e72e67b7d3d774bb6c01f302ba247369")
        (revision "0"))
    (package
      (name "emacs-meme")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/larsmagne/meme")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0nyndag4cjsqdmx9ajf5w65x7821mv4cvj1y88ij6dprl554pr0b"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-imgur-el))
      (home-page "https://github.com/larsmagne/meme")
      (synopsis "Emacs meme generator")
      (description
"Emacs must have a meme generator.  Using a web browser seems so jejune.")
      (license license:gpl2+))))

(define-public emacs-imgur-el
  (let ((commit "02e0ce9fc3a8d5febd61246fc4e586004d4de610")
        (revision "0"))
    (package
      (name "emacs-imgur-el")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/larsmagne/imgur.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0lxi1riv5vl6dmva3rbz8a33mxm1h7vxd43ipdj0p1hirsa4nphh"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/larsmagne/imgur.el")
      (synopsis "Simple library for uploading pictures to imgur")
      (description
"@code{emacs-imgur-el} is a simple library for uploading pictures to imgur.")
      (license license:gpl2+))))

(define-public emacs-ii-mode
  (let ((commit "dec54c0e75e9477a3f4f667aa6c60364d567e660")
        (revision "0"))
    (package
      (name "emacs-ii-mode")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/krl/ii-mode")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0rppzaljwh9svzfav0xb0vjhvgcrq2axpn1vp7kbr4piyd9hq99h"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/krl/ii-mode")
      (synopsis "Emacs mode for interacting with ii")
      (description
"@code{emacs-ii-mode} is an Emacs mode for handling files created
by ii.  It can help you to stay logged in even through emacs restarts.
The model of using Emacs for interfaces to external programs, rather than
running them inside the elisp environment itself also seems more elegant.
This allows for a much more detached use of irc, not having to keep
one buffer open for each channel, but still getting notified if someone
pings you.")
      (license license:gpl3+))))

(define-public emacs-fzf-el
  (let ((commit "e045e7ede6a3d5f792cd11efe5e83cf60d8081bb") (revision "0"))
    (package
      (name "emacs-fzf-el")
      (version (git-version "0.1" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/bling/fzf.el")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0y4abgwcb28dpnzqcl2dylymnkg1v91nrnpsrly0dp8bf0aiafrq"))))
      (build-system emacs-build-system)
      (inputs (list fzf))
      (home-page "https://github.com/bling/fzf.el")
      (synopsis "Front-end for fzf")
      (description "An @command{emacs} front-end for @command{fzf}.")
      (license license:gpl3+))))

(define-public emacs-worf
  (let ((commit "aab516cd0cae65796cce89b29691e95d18bec3ef")
        (revision "0"))
    (package
      (name "emacs-worf")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/abo-abo/worf")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1kiy00r01h05p5i2g0z5kv9dhk3hcbfhjc3gibcx7bspsjsnmn7q"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-ace-link" ,emacs-ace-link)
         ("emacs-swiper" ,emacs-swiper)
         ("emacs-zoutline" ,emacs-zoutline)))
      (home-page "https://github.com/abo-abo/worf")
      (synopsis "vi-like bindings for org-mode")
      (description "GNU Emacs minor mode that provides vi-like bindings for org-mode.")
      (license license:gpl3))))

(define-public emacs-webkit
  (let ((commit "96a4850676b74ffa55b52ff8e9824f7537df6a47")
        (revision "0")
        (version "0.09"))
  (package
   (name "emacs-webkit")
   (version (git-version version revision commit))
   (source
    (origin
      (method git-fetch)
      (uri (git-reference
            (url "https://github.com/akirakyle/emacs-webkit")
            (commit commit)))
      (file-name (git-file-name name version))
      (sha256
       (base32 "0ifdngan6jhbz6p72igwvmz7lhmz7hl8ak5n7zjkvxmq05kxkc5a"))
;;; The snippet before (search-patches ...) is copied from nonguix:
;;; what didn't work: just putting it in /guixrus/patches
;;; NOTE: there are also channels where patches just lie in the rootdir
;;; TODO: How to find patches in channels/locally without this?
      ;;an unmerged commit; package doesn't build without
      (patches
       (parameterize
           ((%patch-path
             (map
              (lambda (directory)
                (string-append directory "/guixrus/packages/patches"))
              %load-path)))
         (search-patches "emacs-webkit-require-org-link.patch")))))
   (build-system emacs-build-system)
   (native-inputs (list pkg-config libtool gsettings-desktop-schemas))
   (inputs (list glib glib-networking webkitgtk-with-libsoup2
                 emacs-evil-collection gstreamer))
   (arguments
    `(#:emacs ,emacs-next
      ;; TODO most of these might actually be unneeded
      #:imported-modules
      (,@%gnu-build-system-modules
       ,@%emacs-build-system-modules
       (guix build gnu-build-system)
       (guix build emacs-build-system)
       (guix build emacs-utils))
      #:modules
      ((guix build gnu-build-system)
       (guix build emacs-build-system)
       (guix build emacs-utils)
       (guix build utils))
       #:phases
       (modify-phases %standard-phases
         (add-before 'install 'make-webkit-module
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (setenv "CC" ,(cc-for-target))
               (setenv "PREFIX" out)
               (setenv "HOME" (getcwd))
               (invoke "make" "all"))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((install (assoc-ref %standard-phases 'install)))
               (install
                #:outputs outputs
                #:include (cons* "\\.so$" "\\.css$" "\\.js$"
                                 %default-include))))))))
;;; some other packages that install dynamic modules also install them in /lib
;;; TODO: include this, change to symlink?
         ;;   (add-after 'build 'install-dynamic-module
         ;;     (lambda*
         ;;         (#:key outputs #:allow-other-keys)
         ;;       ;; Move the file into /lib.
         ;;       (install-file
         ;;        "webkit-module.so"
         ;;        (string-append (assoc-ref outputs "out") "/lib")) #t)))
   (synopsis "Use the webkit browser engine from emacs")
   (description "@{code}Emacs-webkit comes with a dynamic module for
webkitgtk in emacs, making it possible to be more powerful/flexible
then the traditional xwidget variant")
   (home-page "https://github.com/akirakyle/emacs-webkit")
   (license license:expat))))

(define-public emacs-orca
  (let ((commit "47c03af0c1df2b679d800f3708d675a4c2a3e722")
        (revision "0"))
    (package
      (name "emacs-orca")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/abo-abo/orca")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0dah1wb9fyixwza8h2bc2vzps4zd9y9g97yhrm2vjvddabzsyq3a"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/abo-abo/orca")
      (synopsis "My org-capture and org-protocol setup")
      (description "My org-capture and org-protocol setup.")
      (license license:gpl3))))

(define-public emacs-org-fu
  (let ((commit "c50abcef7de96508033dfda734c9bcb3faa85a1c")
        (revision "0"))
    (package
      (name "emacs-org-fu")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/abo-abo/org-fu")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1iqz0jfwvwhjv8zdby8w9dlydp0zhqrsf5mfd0sf6v3sw1dd5jzf"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-orca" ,emacs-orca)))
      (home-page "https://github.com/abo-abo/org-fu")
      (synopsis "My org-capture and org-protocol setup")
      (description "My org-capture and org-protocol setup.")
      (license license:gpl3))))

(define-public emacs-dired-guess
  (let ((commit "cf1d5469b8067371776095a52941058c35a60303")
        (revision "0"))
    (package
      (name "emacs-dired-guess")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/abo-abo/dired-guess")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1ayga4ydinr5lpcjl7mlqwm47af33w8583d0ndyqmrwbli656j6z"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/abo-abo/dired-guess")
      (synopsis "Emacs Dired Guess")
      (description "Associate file extensions with programs that can open them
for dired.")
      (license license:gpl3))))

(define-public emacs-pomodoro-el
  (let ((commit "ed888b24d0b89a5dec6f5278b1064c530c827321")
        (revision "0"))
    (package
      (name "emacs-pomodoro-el")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/baudtack/pomodoro.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0yv1339q5s31wxw8y34pb09b0rlvz9m3gzqb4dc1q8ncq8xb8wl5"))))
      (build-system emacs-build-system)
      (inputs (list mplayer))
      (home-page "https://github.com/baudtack/pomodoro.el")
      (synopsis "Emacs pomodoro timer")
      (description "An @command{emacs} emacs timer for the
@uref{http://www.pomodorotechnique.com/ pomodoro technique}.")
      (license license:gpl3))))

(define-public emacs-guix-packaging
  (let ((commit "d843088252467db3c8a09de40ae9a62050196a0e"))
    (package
      (name "emacs-guix-packaging")
      (version "1.0")
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/ryanprior/emacs-guix-packaging")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1hh1l10phcsai98pbhnxr9572vwg5al2v0g0fhz41sv486fi93hi"))))
      (build-system emacs-build-system)
      (propagated-inputs
       (list
        emacs-dash
        emacs-yasnippet))
      (home-page "https://github.com/ryanprior/emacs-guix-packaging")
      (synopsis "Tools for writing and maintaining Guix packages")
      (description "@command{guix-packaging} provides tools to create and
maintain Guix packages quickly and with confidence.")
      (license license:gpl3+))))

(define-public emacs-ranger
  (let ((commit "2498519cb21dcd5791d240607a72a204d1761668"))
    (package
      (name "emacs-ranger")
      (version "1.0")
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/ralesi/ranger.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1wzshhg6dchny9drm8lf8sw4s24icgyb4my58xvhm55dp4zl5p3b"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/ralesi/ranger.el")
      (synopsis "Bringing the goodness of ranger to dired!")
      (description "@command{emacs-ranger} is a minor mode that runs within
dired, it emulates many of ranger's features.  This minor mode shows a stack of
parent directories, and updates the parent buffers, while you're navigating the
file system.  The preview window takes some of the ideas from Peep-Dired, to
display previews for the selected files, in the primary dired buffer.")
      (license license:gpl3+))))

(define-public emacs-dirvish
  (let ((commit "82819c2e548d64a98c592c930c7c3330210206dc")
        (revision "0"))
    (package
      (name "emacs-dirvish")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/alexluigit/dirvish")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0ys9mbsl8mbi2bgw9920bjxscjydcs2w0r8lh1fm1k2mz2ylxnfw"))))
      (build-system emacs-build-system)
      (propagated-inputs
       (list
        emacs-posframe))
      (inputs
       (list
        exa))
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-exa-executable
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((exa (assoc-ref inputs "exa")))
                 ;; .el is read-only in git.
                 (make-file-writable "dirvish-preview.el")
                 ;; Specify the absolute file names of exa so that everything
                 ;; works out-of-the-box.
                 (substitute* "dirvish-preview.el"
                   (("exa")
                    (string-append exa "/bin/exa")))))))))
      (home-page "https://github.com/alexluigit/dirvish")
      (synopsis "Dired can be a nice file manager")
      (description "@code{emacs-dirvish} empowers dired by giving it a
modern UI in a unintrusive way.  Emacs users deserve a file manager better than
those popular ones on terminal such as @code{ranger}, @code{vifm}, @code{lf}
since Emacs is not limited to a terminal.")
      (license license:gpl3+))))

(define-public emacs-eshell-vterm
  (let ((commit "4e8589fcaf6243011a76b4816e7689d913927aab")
        (version "0.1")
        (revision "1"))
    (package
      (name "emacs-eshell-vterm")
      (version (git-version version revision commit))
      (source
        (origin
          (method git-fetch)
          (uri
            (git-reference
              (url "https://github.com/iostapyshyn/eshell-vterm")
              (commit commit)))
          (sha256
            (base32 "0hsby6ardi9g37agh181sgvsdvjmvi1n6jsqp34mwslwx7xxjvbv"))))
      (propagated-inputs
        (list emacs-vterm))
      (build-system emacs-build-system)
      (home-page "https://github.com/iostapyshyn/eshell-vterm")
      (synopsis "Use vterm in e-shell")
      (description
"An Emacs global minor mode allowing eshell to use vterm for visual
commands.")
      (license license:expat))))

(define-public emacs-peut-publier
  (let ((commit "25b35afc33e32d1c17442547e122b154eb6005af")
        (revision "0"))
    (package
      (name "emacs-peut-publier")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/excalamus/peut-publier")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0670rrn3ldrf7kzfpcm92z4nbc8knwwmxqv0cxn3drxw5ai6f339"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/excalamus/peut-publier")
      (synopsis "Peut-publier enables users to publish")
      (description
"@code{emacs-peut-publier} is a static website generator for Emacs. It's
designed to be customized and extended using Emacs Lisp.  Websites are
built from lightweight markup files. The default site is an Org mode
blog.")
      (license license:gpl3+))))

(define-public emacs-trident-mode
  (let ((commit "109a1bc10bd0c4b47679a6ca5c4cd27c7c8d4ccb")
        (revision "0"))
    (package
      (name "emacs-trident-mode")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/johnmastro/trident-mode.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0blbxjaddzhkvzlys46yrzszywmyjkmfhwks52v4laya76rgxm45"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-skewer-mode emacs-dash emacs-slime))
      (home-page "https://github.com/johnmastro/trident-mode.el")
      (synopsis "Emacs minor mode for live Parenscript interaction")
      (description
"@code{emacs-trident-mode} is an @code{emacs} minor mode and collection
of commands for working with Parenscript code in SLIME and sending it to
the browser via Skewer.  The goal is to create an environment for hacking
Parenscript which fits as naturally as possible into the Lisp style of
interactive development.")
      (license license:unlicense))))

(define-public emacs-wgsl-mode
  (let ((commit "eaf56e308d233cbc7bbafee2678765b3cf311dc9")
        (revision "0"))
    (package
      (name "emacs-wgsl-mode")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/KeenS/wgsl-mode.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1zn4dhnlqy1p5cbxjgfmkckpbqr34r5ka2rwl7cfg7yc56j3hnx6"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/KeenS/wgsl-mode.el")
      (synopsis "Emacs major mode for WebGPU Shadring Language")
      (description
"@code{emacs-wgsl-mode} is an @code{emacs} major mode for WebGPU Shading
Language.")
      (license license:gpl3+))))

(define-public emacs-awesome-tray
  (let ((commit "86fe7b067f0f91b3902418f1d677630fe999fc62")
        (revision "0"))
    (package
      (name "emacs-awesome-tray")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/manateelazycat/awesome-tray")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1b07vq37idnm6yxq9c6gknw0bi6wk3yrpwi64w6l9lv1b0qq77af"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/manateelazycat/awesome-tray")
      (synopsis "An awesome tray for emacs")
      (description
"Hide mode-line, display necessary information at right of minibuffer.")
      (license license:gpl3+))))

(define-public emacs-sink-el
  (let ((commit "d64ee23df974851352c48d17eeeb9376c40779a9")
        (revision "0"))
    (package
      (name "emacs-sink-el")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/alcah/sink.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1bshm19cbsjn100nfjz2anmpgp9yml88701nfdal9a2b7g6dr5x9"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/alcah/sink.el")
      (synopsis "Receive messages from Plan9's plumber in Emacs")
      (description
"@code{sink.el} provides a global minor mode allowing Emacs to receive and
respond to messages from the Plan9 plumber via its ports interface.")
      (license license:unlicense))))

(define-public emacs-tmd-el
  (let ((commit "c68302c3b72cc4082640e7b2248dc6ccf13747b9")
        (revision "0"))
    (package
      (name "emacs-tmd-el")
      (version (git-version "20201108" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/omar-polo/tmd.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0pgb55lrgrzc81dp8680hibpav070ry9z80hhh30x4ngmq3ipsw0"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/omar-polo/tmd.el")
      (synopsis "Most dangerous minor mode")
      (description
"The Most Dangerous Minor Mode, as the name says, is a particularly
dangerous Emacs minor mode.  It’s inspired by the website “the most
dangerous writing app”.  If you don’t type at least one key every
tmd-timeout, (by default 5 seconds) the whole buffer will be deleted
(the narrowing will be respected).")
      (license license:expat))))

(define-public emacs-why-this
  (let ((commit "3497115c2b3cc6f288770d3ae61ff1079ecc3b1e")
        (revision "0"))
    (package
      (name "emacs-why-this")
      (version (git-version "20220222" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/emacsmirror/why-this")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1xcq6r25j60x2zrv1hn5whzq9aydjya5a3k25k6nz8hmc9cdp9dm"))))
      (build-system emacs-build-system)
      (home-page "https://codeberg.org/akib/emacs-why-this")
      (synopsis "Why is this line here? Ask version control")
      (description
"@code{emacs-why-this} shows why the current line was changed on the
right side of line.  It can also render editing history as heat maps.")
      (license license:gpl3+))))

(define-public emacs-catppuccin-theme
  (let ((commit "04df97cdb49bc87478b98530bc1cfb1958109770")
        (revision "0"))
    (package
      (name "emacs-catppuccin-theme")
      (version (git-version "20220225" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/pspiagicw/catppuccin-emacs")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "047jbj5snjvjcb4ir0cylp3lh6kdxjwvd8bm28xjsxxwvig879bj"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/pspiagicw/catppuccin-emacs")
      (synopsis "Catppuccin for Emacs")
      (description
"@code{emacs-catppuccin-theme} is a catppuccin theme for Emacs.")
      (license license:expat))))

(define-public emacs-sam-el
  (let ((commit "5d5ab9aaa09664ecd397b535460f9d65595f507f")
        (revision "0"))
    (package
      (name "emacs-sam-el")
      (version (git-version "20210421" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/omar-polo/sam.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0ba8jcd3x1qd6vflhd80dcipns5jplay0dsglbppf3mcrswcrlp3"))))
      (build-system emacs-build-system)
      (arguments
       `(#:tests? #f)) ;; fixme
      (home-page "https://github.com/omar-polo/sam.el")
      (synopsis "Sam emulation for Emacs")
      (description
"@code{emacs-sam-el} provides structural regular expressions for Emacs.")
      (license license:isc))))

(define-public emacs-affe
  (package
    (name "emacs-affe")
    (version "0.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
       (url "https://github.com/minad/affe")
       (commit version)))
       (file-name (git-file-name name version))
       (sha256
    (base32 "01hmhg3smjni8gpyap4wmqb4ax6dxfn6jnwlpdp76imbvb9m26ma"))))
    (build-system emacs-build-system)
    (inputs
     (list emacs-consult))
    (home-page "https://github.com/minad/affe")
    (synopsis "Asynchronous Fuzzy Finder for Emacs")
    (description
"This package provides an asynchronous fuzzy finder similar to the @code{fzf}
command-line fuzzy finder, written in pure Elisp.")
    (license license:gpl3+)))

(define-public emacs-consult-projectile
  (let ((commit "98dd9a0ad511f998933a69c8c4d5488f53b9c4d4") (revision "0")
        (version "0.5"))
    (package
      (name "emacs-consult-projectile")
      (version (git-version version revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://gitlab.com/OlMon/consult-projectile")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1kn45cv10hb4igrw5h874mnm36khd6wssfy7wmslfi4ab56jwjyg"))))
      (build-system emacs-build-system)
      (inputs
        (list emacs-projectile
              emacs-consult))
      (home-page "https://gitlab.com/OlMon/consult-projectile")
      (synopsis "Incorporates projectile into consult")
      (description
"A multiview for displaying open buffers, files and directories accociated
with a project.  When no project is open in the current buffer display
a list of known project and select a file from the selected project.")
      (license license:gpl3+))))

(define-public emacs-ednc
  (let ((commit "bf588399e241742962613ce2a96f0cffc86417f6")
	(revision "0")
	(version "0.1"))
    (package
     (name "emacs-ednc")
     (version (git-version version revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
	     (url "https://github.com/sinic/ednc")
	     (commit commit)))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0y0rxiqa1vxz4ylhagr9mnh1x4lghg1md3k1pqzciq9gnqgl3fpn"))))
     (build-system emacs-build-system)
     (home-page "https://github.com/sinic/ednc")
     (synopsis "The Emacs Desktop Notification Center ")
     (description "The Emacs Desktop Notification Center (EDNC) is an Emacs package written in pure Lisp that implements a Desktop Notifications service according to the freedesktop.org specification.")
     (license license:gpl3+))))

(define-public emacs-guess-language
  (let ((commit "e6b78ed2a36bf5debd3d07ffd99a5a8ca60609d6")
	(revision "0")
	(version "0.0.1"))
    (package
     (name "emacs-guess-language")
     (version (git-version version revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
	     (url "https://github.com/tmalsburg/guess-language.el")
	     (commit commit)))
       (file-name (git-file-name name version))
       (sha256
	(base32 "0g0vdz42s6hns249lfxcha7l7ihqpyay3n5iijziwrbrrhqi6rx6"))))
     (build-system emacs-build-system)
     (propagated-inputs (list emacs-nadvice))
     (home-page "https://github.com/tmalsburg/guess-language.el")
     (synopsis "Robust automatic language detection")
     (description
      "@code{emacs-guess-language} detects the language of what you’re typing. Automatically switches the spell checker and typo-mode.")
     (license license:gpl3+))))

(define-public emacs-txl
  (let ((commit "5acbd900c4a7e7a1b39798bcc68c1d9024055a1f")
	(revision "0")
	(version "0.0.2"))
    (package
     (name "emacs-txl")
     (version (git-version version revision commit))
     (source
      (origin
       (method git-fetch)
       (uri (git-reference
	     (url "https://github.com/tmalsburg/txl.el")
	     (commit commit)))
       (file-name (git-file-name name version))
       (sha256
	(base32 "1yn1kn2zpr3p355136wxy7g1xqhywxg0jy5y2pc7l3nx1lqg1x24"))))
     (build-system emacs-build-system)
     (propagated-inputs (list emacs-request emacs-guess-language))
     (home-page "https://github.com/tmalsburg/txl.el")
     (synopsis "Provides machine translation through DeepL")
     (description synopsis)
     (license license:gpl3+))))

(define-public emacs-helm-dired-history
  (package
    (name "emacs-helm-dired-history")
    (version "1.3")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/jixiuf/helm-dired-history")
         (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1bqavj5ljr350dckyf39i9plkb0rbhyd17ka94n2g6daapgpq0x6"))))
    (build-system emacs-build-system)
    (propagated-inputs
      (list emacs-helm))
    (home-page "https://github.com/remvee/helm-dired-history")
    (synopsis "Show dired histories you have visited in Emacs")
    (description
"@code{emacs-helm-dired-history} shows dired histories you have visited
in Emacs.")
    (license license:gpl3+)))

(define-public emacs-wrap-region
  (let ((commit "fbae9b0f106187af19823f1a6260b5c68b7252e6")
        (revision "0"))
    (package
      (name "emacs-wrap-region")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/rejeep/wrap-region.el")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1k5q925igdv5lnpbmy0c2f0j3rj7yh4l6bxbd61g9lcnyl0j3ym9"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-dash))
      (home-page "https://github.com/rejeep/wrap-region.el")
      (synopsis "Emacs minor mode to wrap region with tag or punctuations")
      (description
"@code{emacs-wrap-region} is a minor mode for Emacs that wraps a region
with punctuations.  For tagged markup modes, such as HTML and XML,
it wraps with tags.")
      (license license:gpl3+))))

(define-public emacs-hl-line-plus
  (let ((commit "55b0fac35af9f7078cca10f47fcdedb628d92ca5")
        (revision "0"))
    (package
      (name "emacs-hl-line-plus")
      (version (git-version "0.1" revision commit))
      ;; https://emacs.stackexchange.com/questions/51666/why-is-hl-line-el-not-a-package
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/emacsmirror/hl-line-plus")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0p6a3kq6v3jwaivj7rda80wfgr0jqg0b93l14qc5mdxjfknwy9ym"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-dash))
      (home-page "https://github.com/emacsmirror/hl-line-plus.el")
      (synopsis "Extensions to hl-line.el")
      (description
"@code{emacs-hl-line-plus} provides exntensions to @code{hl-line.el}.")
      (license license:gpl3+))))

(define-public emacs-impostman
  (let ((commit "5b122f3d5a3421aa2d89bdc9dc4aafaf19cf85d4")
        (revision "0"))
    (package
      (name "emacs-impostman")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/flashcode/impostman")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "095g54cxicd5ysxpw2zaw4i92yxmr3inwacbla34aa0l62lqy5ig"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/flashcode/impostman.el")
      (synopsis "Import of Postman collections in Emacs")
      (description
"@code{emacs-impostman} provides utilities for importing Postman
collections and environments.")
      (license license:gpl3+))))

(define-public emacs-anaphora-anywhere
  (let ((commit "9d68e046f14649397e43fbe47640c1eadc8f8698")
        (revision "0"))
    (package
      (name "emacs-anaphora-anywhere")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/jphmrst/anaphora-anywhere")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "111jkhgi40fhrqwvcbbakp5gdyiqpz3kqbbkwzv7bgp6l4j86s7m"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/flashcode/anaphora-anywhere.el")
      (synopsis "Anaphoric references in Emacs Lisp")
      (description
"@code{emacs-anaphora-anywhere} provides anaphoric references in emacs lisp.")
      (license license:gpl3+))))

(define-public emacs-pippel
  (let ((commit "682a40af266f395cf39862ad0bfb30152ddee204")
        (revision "0"))
    (package
      (name "emacs-pippel")
      (version (git-version "1.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/arifer612/pippel")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1gb7nf047gm57jdggj49ri46hgz8gphqy58abniqlqxjcx9zp4z7"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list python-pip emacs-dash emacs-s))
      (home-page "https://github.com/arifer612/pippel")
      (synopsis "Emacs frontend to python package manager pip")
      (description
"@code{emacs-pippel} is an Emacs frontend for the Python package manager pip.")
      (license license:gpl3+)))) ; License is in pyimport.el

;; todo: copy python files to the store.
(define-public emacs-importmagic
  (package
    (name "emacs-importmagic")
    (version "1.1")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/anachronic/importmagic.el")
         (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0s6hp62kmhvmgj3m5jr3cfqc8yv3p8jfxk0piq8xbf2chr1hp6l5"))))
    (build-system emacs-build-system)
    (propagated-inputs
      (list python-importmagic
            python-sexpdata
            python-epc
            emacs-epc
            emacs-f
            emacs-dash
            emacs-s))
    (home-page "https://github.com/anachronic/importmagic.el")
    (synopsis "Emacs package that resolves unimported Python symbols")
    (description
"@code{emacs-importmagic} is an Emacs package inspired by
th@code{python-importmagic} library and PyCharm's ability to suggesimports
for unresolved symbols.")
    (license license:gpl3+)))

(define-public emacs-helm-pydoc
  (let ((commit "85480a29b56dacde425655bc8f5a597c785afdf5")
        (revision "0"))
    (package
      (name "emacs-helm-pydoc")
      (version (git-version "1.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/emacsorphanage/helm-pydoc")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1wrs2d84xzjnsmw255bmnd1wcpwd36m0vyni48aa7661d4dh10x3"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-helm))
      (inputs
        (list python))
      (arguments
        (list #:phases
              #~(modify-phases %standard-phases
                  (add-after 'unpack 'patch-python-executable
                    (lambda* (#:key inputs #:allow-other-keys)
                      (let ((python (assoc-ref inputs "python")))
                        (make-file-writable "helm-pydoc.el")
                        (substitute* "helm-pydoc.el"
                          (("/bin/python")
                           (string-append python "/bin/python")))))))))
      (home-page "https://github.com/emacsorphanage/helm-pydoc")
      (synopsis "pydoc with helm interface")
      (description
"@code{emacs-helm-pydoc} provides a pydoc helm interface.")
      (license license:gpl3+))))

(define-public emacs-vline-mode
  (package
    (name "emacs-vline-mode")
    (version "1.11")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/EricCrosson/vline-mode")
         (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1hrdi5qlwlyp3z1yps8xfiwd9xk9xs3l4vb8m2jfwh2icgp93xlk"))))
    (build-system emacs-build-system)
    (home-page "https://github.com/EricCrosson/vline-mode/")
    (synopsis "Simple Emacs major-mode for the redo build system")
    (description
"@code{emacs-vline-mode} provides a simple Emacs major-mode for the redo
build system.")
    (license license:gpl2+)))

(define-public emacs-lin
  (package
    (name "emacs-lin")
    (version "0.3.0")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://git.sr.ht/~protesilaos/lin")
         (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1w1mli2wrxbnwagn3rx5ygslmzlri3drm74nqgwpl4pwh66xi98a"))))
    (build-system emacs-build-system)
    (home-page "https://protesilaos.com/emacs/lin")
    (synopsis "Lin is a stylistic enhancement for Emacs’ built-in hl-line-mode")
    (description
"@code{emacs-lin} is a stylistic enhancement for Emacs’ built-in
hl-line-mode.  It remaps the hl-line face (or equivalent) buffer-locally
to a style that is optimal for major modes where line selection is the
primary mode of interaction.")
    (license license:gpl3+)))

(define-public emacs-nano-theme
  (let ((commit "ceeffd29cc7d55d4089ad33399299decf34b57c5")
        (revision "0"))
    (package
      (name "emacs-nano-theme")
      (version (git-version "20220201" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/rougier/nano-theme")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0smax71w4h1jvl163bx6a44a82mk3grwcc98sk6z82rql98kk65c"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/rougier/nano-theme/")
      (synopsis "GNU Emacs NANO Theme")
      (description
"@code{emacs-nano-theme} provides a consistent theme for GNU Emacs.")
      (license license:gpl3+))))

(define-public emacs-pip-requirements
  (let ((commit "216cd1690f80cc965d4ae47b8753fc185f778ff6")
        (revision "0"))
    (package
      (name "emacs-pip-requirements")
      (version (git-version "0.6" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/Wilfred/pip-requirements.el")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "0da3q0n5nn0l96kk49kanw5knx3jmga439zbmiii76na16bg5y3i"))))
      (build-system emacs-build-system)
      (propagated-inputs (list emacs-dash))
      (home-page
       "https://github.com/Wilfred/pip-requirements.el")
      (synopsis "Major mode for editing pip requirements files")
      (description
"@code{emacs-pip-requirements} is a major mode for editing pip
requirements files, with the following features:
@itemize
@item Syntax highlighting
@item Togglable comments
@item Auto completion of package names from PyPI
@end itemize\n")
      (license license:gpl3+))))

(define-public emacs-live-py
  (package
    (name "emacs-live-py")
    (version "4.8.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/donkirkby/live-py-plugin")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "14n8cf020hpz9hrhf7pxcxszvbkp19s5j5cz3a42n4jh7jpacdzp"))))
    (build-system emacs-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'enter-emacs-plugin-directory
            (lambda _ (chdir "emacs-live-py-mode"))))))
    (home-page "https://donkirkby.github.io/live-py-plugin/starting_emacs.html")
    (synopsis "Live coding in Python with Emacs")
    (description
"@code{emacs-live-py} provides a way to visualize your Python code while
you type it in Emacs.")
    (license license:expat)))

(define-public emacs-notebook-mode
  (let ((commit "f12a02b6d4639e07684594a0b4e5e9d862e7a249")
        (revision "0"))
    (package
      (name "emacs-notebook-mode")
      (version (git-version "0.2" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/rougier/notebook-mode")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "03l9ylpwv7gi4jwc50xl3skni46vd8wb5ybk6bkh823g19rljdkk"))))
      (build-system emacs-build-system)
      (arguments
        (list #:phases
              #~(modify-phases %standard-phases
                  (add-after 'unpack 'patch-python-executable
                    (lambda* (#:key inputs #:allow-other-keys)
                      (let ((python (assoc-ref inputs "python")))
                        (make-file-writable "notebook.el")
                        (substitute* "notebook.el"
                          (("/opt/anaconda3/bin/python")
                           (string-append python "/bin/python")))))))))
      (inputs (list python))
      (propagated-inputs (list emacs-svg-tag-mode))
      (home-page "https://github.com/rougier/notebook-mode/")
      (synopsis "GNU Emacs notebook mode")
      (description
"@code{emacs-notebook-mode} provides a modern look for viewing Jupyter
notebooks in GNU Emacs.")
      (license license:gpl3+))))

(define-public emacs-org-imenu
  (let ((commit "6bf7c5cca2ba8bda3dd7052daa7ffaee58861fb8")
        (revision "0"))
    (package
      (name "emacs-org-imenu")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/rougier/org-imenu")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "0ilavyaa86mxp5z1li03fmpzh12cbfjkpcdjc04jizgrwjmdfrqq"))))
      (build-system emacs-build-system)
      (propagated-inputs (list emacs-imenu-list))
      (home-page "https://github.com/rougier/org-imenu/")
      (synopsis "Org imenu filtering")
      (description
"@code{emacs-org-imenu} shows a sidebar displaying the Imenu and allows
the user to filter which headlines are shown using the interactive
@code{org-imenu-filter-select} that uses the same syntax as org-mode
search.")
      (license license:gpl3+))))

(define-public emacs-cython-mode
  (package
    (name "emacs-cython-mode")
    (version "0.29.30")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/cython/cython")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "141qywx4ym817lrpqis4x2i2bll0hcjljn1qfnn1dwmhmydhhkwx"))))
    (build-system emacs-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'enter-emacs-plugin-directory
            (lambda _ (chdir "Tools"))))))
    (home-page "https://cython.org/")
    (synopsis "Major mode for editing and compiling Cython files")
    (description
"@code{emacs-cython-mode} is a Major mode for Cython development,
derived from @code{python-mode}.")
    (license license:asl2.0)))

(define-public emacs-flycheck-cython
  (let ((commit "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76")
        (revision "0"))
    (package
      (name "emacs-flycheck-cython")
      (version (git-version "1.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/lbolla/emacs-flycheck-cython")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "1v17skw0wn7a7nkc1vrs0bbzihnjw0dwvyyd0lydsihzxl5z2r5g"))))
      (build-system emacs-build-system)
      (propagated-inputs (list emacs-flycheck))
      (home-page "https://github.com/lbolla/emacs-flycheck-cython/")
      (synopsis "Flycheck checker for Cython files")
      (description
"@code{emacs-flycheck-cython} provides a flycheck interface to Cython,
an optimising static compiler for both the Python programming language
and the extended Cython programming language.")
      (license license:gpl3+))))

(define-public emacs-prelude-ivy
  (let ((commit "8a3b557d45652bd7d06de113a1bbe0d406132c96")
        (revision "0"))
    (package
      (name "emacs-prelude-ivy")
      (version (git-version "1.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/bbatsov/prelude")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "0hv05bmb3w9k9mrsnd3wd3j3i9f91a9b5scq5pa649md1ds24k1m"))))
      (build-system emacs-build-system)
      (arguments
       (list
        #:phases
        #~(modify-phases %standard-phases
            (add-after 'unpack 'comment-out-prelude-code
              (lambda _
                (chdir "modules")
                (for-each delete-file '("prelude-c.el"
                                        "prelude-clojure.el"
                                        "prelude-coffee.el"
                                        "prelude-common-lisp.el"
                                        "prelude-company.el"
                                        "prelude-css.el"
                                        "prelude-dart.el"
                                        "prelude-elixir.el"
                                        "prelude-emacs-lisp.el"
                                        "prelude-erc.el"
                                        "prelude-erlang.el"
                                        "prelude-evil.el"
                                        "prelude-fsharp.el"
                                        "prelude-go.el"
                                        "prelude-haskell.el"
                                        "prelude-helm-everywhere.el"
                                        "prelude-helm.el"
                                        "prelude-ido.el"
                                        "prelude-js.el"
                                        "prelude-key-chord.el"
                                        "prelude-latex.el"
                                        "prelude-lisp.el"
                                        "prelude-lsp.el"
                                        "prelude-lua.el"
                                        "prelude-ocaml.el"
                                        "prelude-org.el"
                                        "prelude-perl.el"
                                        "prelude-programming.el"
                                        "prelude-python.el"
                                        "prelude-racket.el"
                                        "prelude-ruby.el"
                                        "prelude-rust.el"
                                        "prelude-scala.el"
                                        "prelude-scheme.el"
                                        "prelude-scss.el"
                                        "prelude-selectrum.el"
                                        "prelude-shell.el"
                                        "prelude-ts.el"
                                        "prelude-web.el"
                                        "prelude-xml.el"
                                        "prelude-yaml.el"))
                (substitute* "prelude-ivy.el"
                  (("\\(prelude-require-packages") ";;")))))))
      (propagated-inputs
        (list emacs-ivy emacs-diminish emacs-swiper emacs-counsel))
      (home-page "https://github.com/bbatsov/prelude/")
      (synopsis "Just the ivy module from Prelude")
      (description
"@code{emacs-prelude-ivy} provides just the ivy configuration from
Prelude.")
      (license license:gpl3+))))

(define-public emacs-eval-in-repl
  (package
    (name "emacs-eval-in-repl")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl.el"))
       (sha256
        (base32
         "15k2ks034hq2dmm8n70xl7f4cdw57zqb36s871j7kycpkblclg3n"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-dash emacs-paredit emacs-ace-window))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for various REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval
interface for various REPLs.
Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none.

This package along with REPL/shell specific packages implement similar work flow
for various REPLs.

This package alone is not functional. It also requires the following packages
depending on your needs :
eval-in-repl-ielm    for Emacs Lisp
eval-in-repl-cider   for Clojure
eval-in-repl-slime   for Common Lisp
eval-in-repl-geiser  for Racket/Scheme
eval-in-repl-racket  for Racket
eval-in-repl-scheme  for Scheme
eval-in-repl-hy      for Hy
eval-in-repl-python  for Python
eval-in-repl-ruby    for Ruby
eval-in-repl-sml     for Standard ML
eval-in-repl-ocaml   for OCaml
eval-in-repl-prolog  for Prolog
eval-in-repl-javascript for Javascript
eval-in-repl-shell   for Shell
eval-in-repl-iex     for Elixir
eval-in-repl-erlang  for Erlang
eval-in-repl-elm     for Elm")
    (license license:expat)))

(define-public emacs-eval-in-repl-ielm
  (package
    (name "emacs-eval-in-repl-ielm")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-ielm.el"))
       (sha256
          (base32
           "1inm0siq0ybgcrdi1pqzawqqvx1f2540yk3s8r5cd2m6fnrjwllv"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Emacs Lisp REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Emacs Lisp
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package implement
similar work flow for Emacs Lisp REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-cider
  (package
    (name "emacs-eval-in-repl-cider")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-cider.el"))
       (sha256
          (base32
           "047sv99iv2zimv26wncnq7r8x1gjncfcmrxnprgx6s4vm5y217qj"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-cider))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Clojure REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Clojure
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Clojure REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-slime
  (package
    (name "emacs-eval-in-repl-slime")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-slime.el"))
       (sha256
          (base32
           "0qj4dkkkf1xgvcy6wz537w5d2aqnwc75w8g9qzdsfyadaiycgrsd"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-slime))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Common Lisp REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Common Lisp
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Common Lisp REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-geiser
  (package
    (name "emacs-eval-in-repl-geiser")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-geiser.el"))
       (sha256
        (base32
         "0x2v51hwm1iaa0r8mn34i08vck5y32njfwfiq0c0blbfmjsqlyz2"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-geiser))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Racket/Scheme REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for
Racket/Scheme REPLs. Emacs Speaks Statistics (ESS) package has a nice function
called ess-eval-region-or-line-and-step, which is assigned to C-RET. This
function sends a line or a selected region to the corresponding shell (R, Julia,
Stata, etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Racket/Scheme REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-racket
  (package
    (name "emacs-eval-in-repl-racket")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-racket.el"))
       (sha256
          (base32
           "0wpkig2z2vfyv08i444fi2yhjy2mk0la8mpyg0z6zywjm19kyir3"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-racket-mode))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Racket REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Racket
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package implement
similar work flow for Racket REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-scheme
  (package
    (name "emacs-eval-in-repl-scheme")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-scheme.el"))
       (sha256
          (base32
           "0qc2gipr2pm80d3jjxzwbca4wbl0jhb5mp6gfz0qkagffwiv9dpi"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Scheme REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Scheme
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package implement
similar work flow for Scheme REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-hy
  (package
    (name "emacs-eval-in-repl-hy")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-hy.el"))
       (sha256
          (base32
           "1fcf2a6vrmwvd2blh97mfdrzmym2g6q0b63s51p1k5gw7ijz0i4r"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-hy-mode))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Hy REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Hy REPLs.
Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Hy REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-python
  (package
    (name "emacs-eval-in-repl-python")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-python.el"))
       (sha256
        (base32
         "06abhykzz41wz8h3gr0x0ljiva9rfgpagija24afpdg8l2w0b3jn"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Python REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Python
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Python REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-ruby
  (package
    (name "emacs-eval-in-repl-ruby")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-ruby.el"))
       (sha256
        (base32
         "05yrv9pj91yfxk46g5ky9xixndgmzv0c4nhn4qsn85mx3jy9x915"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-inf-ruby))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Ruby REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Ruby REPLs.
Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Ruby REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-sml
  (package
    (name "emacs-eval-in-repl-sml")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-sml.el"))
       (sha256
        (base32
         "0g36fmc5khdkcyax7rnxmnvir43mig9s4mlgr8fkcffxvb2asw7d"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-sml-mode))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Standard ML REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Standard ML
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Standard ML REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-ocaml
  (package
    (name "emacs-eval-in-repl-ocaml")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-ocaml.el"))
       (sha256
        (base32
         "0y36x59adjf87ypfj62rrhdf6lg8qxyahvx9f7p1svblhryg7fr0"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-tuareg))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for OCaml REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for OCaml
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for OCaml REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-prolog
  (package
    (name "emacs-eval-in-repl-prolog")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-prolog.el"))
       (sha256
        (base32
         "0plbi5jrcpzd8jphrsha3ng707qhdysng8xf1ypg4qi0xg9qkh0c"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Prolog REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Prolog
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Prolog REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-javascript
  (package
    (name "emacs-eval-in-repl-javascript")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-javascript.el"))
       (sha256
        (base32
         "09gfd184waa3w4wlz36ys3rj79ms0584j6jibrqww6313h81ny2x"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl
                             emacs-js2-mode
                             emacs-js-comint))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Javascript REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Javascript
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Javascript REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-shell
  (package
    (name "emacs-eval-in-repl-shell")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
             version "/eval-in-repl-shell.el"))
       (sha256
        (base32
         "1jsi8wjibx4v4ysb2xf96g03vqg7n41sxyg5bp8w82qlfjszdnix"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Shell REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Shell
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Shell REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-iex
  (package
    (name "emacs-eval-in-repl-iex")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-iex.el"))
       (sha256
          (base32
           "1qj943bv7vx6rhahkwl619zwjal7agq6ry1cdqwlcvq0mz1ds00r"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl
                             emacs-elixir-mode
                             emacs-alchemist))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Elixir REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Elixir
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Elixir REPLs.")
    (license license:expat)))

(define-public emacs-eval-in-repl-erlang
  (package
    (name "emacs-eval-in-repl-erlang")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-erlang.el"))
       (sha256
          (base32
           "1gk0kgi5j22lszjrna4l79pq8zqyq6g35pk5issacw9jx179nb7n"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-erlang))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Erlang REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Erlang
REPLs. Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Erlang REPLs.")
    (license license:expat)))

#;(define-public emacs-eval-in-repl-elm
  (package
    (name "emacs-eval-in-repl-elm")
    (version "0.9.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://raw.githubusercontent.com/kaz-yos/eval-in-repl/"
               version "/eval-in-repl-elm.el"))
       (sha256
          (base32
           "0ca6070y7s86xs4y1dibq6b1rz143z5i17s7ifra0afgib10a5hb"))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-elm-mode))
    (home-page "https://github.com/kaz-yos/eval-in-repl")
    (synopsis "Consistent ESS-like eval interface for Elm REPLs for emacs")
    (description
     "This package provides a consistent ESS-like eval interface for Elm REPLs.
Emacs Speaks Statistics (ESS) package has a nice function called
ess-eval-region-or-line-and-step, which is assigned to C-RET. This function
sends a line or a selected region to the corresponding shell (R, Julia, Stata,
etc) visibly. It also start up a shell if there is none. This package
implement similar work flow for Elm REPLs.")
    (license license:expat)))

(define-public emacs-js-comint
  (package
    (name "emacs-js-comint")
    (version "1.2.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://stable.melpa.org/packages/js-comint-"
             version
             ".el"))
       (sha256
        (base32 "1qin0hclm3ly62nl5ddiim64bcd2k74b1yqsqqc61cf9k2q8k287"))))
    (build-system emacs-build-system)
    (home-page "https://github.com/redguardtoo/js-comint")
    (synopsis "JavaScript interpreter in window.")
    (description
     "This program is a comint mode for Emacs which allows you to run a compatible
javascript repl like Node.js/Spidermonkey/Rhino inside Emacs. It also defines a
few functions for sending javascript input to it quickly.")
    (license license:gpl3+)))

(define-public emacs-alchemist
  (package
    (name "emacs-alchemist")
    (version "1.8.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://stable.melpa.org/packages/alchemist-"
             version
             ".tar"))
       (sha256
        (base32 "0ik5zhpsxl6ch7kkjjcvr65hdlgqcxm1ywblavwkszsy2kc15wvj"))))
    (build-system emacs-build-system)
    (propagated-inputs
     (list emacs-elixir-mode emacs-dash emacs-company emacs-pkg-info))
    (home-page "http://www.github.com/tonini/alchemist.el")
  (synopsis "Elixir tooling integration into Emacs")
  (description
   "This package brings you all the Elixir tooling and power inside your Emacs
editor.

 Alchemist comes with a bunch of features, which are:

   * Mix integration
   * Compile & Execution of Elixir code
   * Inline code evaluation
   * Inline macro expanding
   * Documentation lookup
   * Definition lookup
   * Powerful IEx integration
   * Smart code completion
   * Elixir project management
   * Phoenix support")
  (license license:gpl3+)))

(define-public emacs-org-babel-eval-in-repl
  (package
    (name "emacs-org-babel-eval-in-repl")
    (version "1.6")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://stable.melpa.org/packages/org-babel-eval-in-repl-"
             version
             ".tar"))
       (sha256
        (base32 "10mzi2l2xdvyiv6bh7vhr439nb9r9d2s3i3zpnk2af8q8l8xn70m"))
       (modules '((guix build utils)))
       ;; Remove matlab
       (snippet
        '(begin (delete-file "eval-in-repl-matlab.el")))))
    (build-system emacs-build-system)
    (propagated-inputs (list emacs-eval-in-repl emacs-ess))
    (home-page "https://github.com/diadochos/org-babel-eval-in-repl")
    (synopsis "Eval org-mode babel code blocks in various REPLs.")
    (description
     "This package allows you to execute org-mode (babel) source code blocks with
eval-in-repl. It features async execution (because it uses an external
process!) and babel execution without the output written in the buffer (Less
visual distraction! Output is reproducible as long as the code is saved). ")
    (license license:expat)))

(define-public emacs-pretty-speedbar
  (let ((commit "56dc9f114fcc55843e182cde1fc9d7a14c261c6a")
        (revision "0"))
    (package
      (name "emacs-pretty-speedbar")
      (version "0.6.0")
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/kcyarn/pretty-speedbar")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1hz67jhvg9n9d07lil6zqciqhh512k0fv54dl605p7vi704ma2ir"))))
      (build-system emacs-build-system)
      (propagated-inputs (list emacs-corfu))
      (home-page "https://github.com/kcyarn/pretty-speedbar")
      (synopsis "SVG icons for Emacs Speedbar")
      (description
"Why turn off the ugly Emacs Speedbar icons when you can replace them
with pretty SVG icons customized to match your theme?")
      (license license:gpl3+))))

(define-public emacs-eldoc-box
  (let ((commit "39b44c99a02299fc7270f1c1832fb37149f8b924")
        (revision "0"))
    (package
      (name "emacs-eldoc-box")
      (version "1.8")
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/casouri/eldoc-box")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "077y6dhxs032r9y7b1if9d2113bvhn3j1vinyh8l16fnnd02cxsi"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/casouri/eldoc-box")
      (synopsis "Childframe doc for eglot")
      (description
"This package displays ElDoc documentations in a childframe.")
      (license license:gpl3+))))

(define-public emacs-eglot-ccls
  (let ((commit "1a4e52ff9422a214c1f0efae8c03530ea63f6fe3")
        (revision "0"))
    (package
     (name "emacs-eglot-ccls")
     (version (git-version "0.0.0" revision commit))
     (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://codeberg.org/akib/emacs-eglot-ccls")
                    (commit commit)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1s06vz1gsjjnrhn55q2dw94gv7swpn8hi171mj22cr0lr5p12vwx"))))
     (build-system emacs-build-system)
     (propagated-inputs
      (list ccls emacs-eglot))
     (home-page "https://codeberg.org/akib/emacs-eglot-ccls")
     (synopsis "@code{ccls} extensions for the Eglot Emacs LSP client")
     (description
      "This package provides semantic highlighting in Emacs for C and C++
code through the @code{ccls} language server. It is based on the
@code{emacs-ccls} package, only modified to work with the @code{emacs-eglot}
LSP plugin instead of @code{emacs-lsp-mode}.")
     (license license:gpl3+))))

(define-public emacs-gemini-mode
  (let ((commit "60bd07b3a1e532c950c132673777ceb635c9960d")
        (revision "0"))
    (package
     (name "emacs-gemini-mode")
     (version (git-version "1.1.2" revision commit))
     (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://git.carcosa.net/jmcbray/gemini.el")
                    (commit commit)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1dj6bmlrqkqvykasdav9f4jw8aykqj6c0jr09r9x4sb2w0pcd9ik"))))
     (build-system emacs-build-system)
     (home-page "https://git.carcosa.net/jmcbray/gemini.el")
     (synopsis "Emacs syntax highlighting for Gemini text")
     (description
      "This package provides an Emacs major mode for editing Gemini
text (gemtext) files.")
     (license license:agpl3+))))

(define-public emacs-ef-themes
  (package
    (name "emacs-ef-themes")
    (version "0.2.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://git.sr.ht/~protesilaos/ef-themes")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "06gy0q905b8wsigsqc5b1xnc1qqy8p04245hc54zb4b26kpvwa3l"))))
    (build-system emacs-build-system)
    (native-inputs (list texinfo))
    (home-page "https://protesilaos.com/emacs/ef-themes/")
    (synopsis "Colourful and legible themes for GNU Emacs")
    (description
"The ef-themes are a collection of light and dark themes for GNU Emacs
whose goal is to provide pretty yet legible options for users who want
something with a bit more flair than the modus-themes.")
    (license license:gpl3+)))

(define-public emacs-charles
  (let ((commit "ff2088e1a0123b57f92f16830d747d4d57b3e978")
        (revision "0"))
    (package
      (name "emacs-charles")
      (version commit)
      (source
        (origin
          (method git-fetch)
          (uri
           (git-reference
            (url "https://github.com/charJe/.emacs.d")
            (commit version)))
          (file-name (git-file-name name version))
          (sha256
           (base32 "1fn685wbkjl4fl1f96f3vvck1rslfcbb87v5ccg2wzkz0m06gx7z"))
          (modules '((guix build utils)))
          (snippet
           '(begin
              (with-directory-excursion "charles"
                (for-each (lambda (file)
                            (unless (equal? file "./charles.el")
                              (delete-file file)))
                          (find-files "." "\\.el$")))))))
      (build-system emacs-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'change-to-dir-where-charles-is-at
             (lambda _
               (chdir "charles"))))))
      (propagated-inputs (list emacs-dash))
      (home-page "https://github.com/charJe/.emacs.d")
      (synopsis "Miscellaneous functions that char uses")
      (description
"Various helper functions that char uses including a SQL utility for
connecting to postgres, inserting tickets into a commit message, dragging
a buffer around, and more.")
      (license license:none))))

(define-public emacs-nyaatouch
  (let ((commit "45c3ab2a448790236c0fd8a35a2011c2d99de65f")
        (revision "0"))
    (package
      (name "emacs-nyaatouch")
      (version (git-version "0.0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/eshrh/nyaatouch")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1ir0fli8ic3fhp0z2z3kkiirhkwjsdg567kxfvd2awzv27d32c3n"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-meow emacs-smartparens emacs-avy emacs-swiper))
      (home-page "https://github.com/eshrh/nyaatouch")
      (synopsis "Meow modal editing scheme optimized for dvorak")
      (description
"@code{emacs-nyaatouch} is a highly ergonomic dvorak modal editing scheme
for Emacs.")
      (license license:gpl3+))))

(define-public emacs-fluffy
  (let ((commit "9fa032ea88f292df8c01f5ffe753ffda2eb790be")
        (revision "0"))
    (package
      (name "emacs-fluffy")
      (version (git-version "0.0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://git.sr.ht/~whereiseveryone/fluffy")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0sdndm5ky8av3gjv5p1n06bxl0wrpb4rianpbaxf12qdg5fkifzl"))))
      (build-system emacs-build-system)
      (propagated-inputs
        (list emacs-meow
              emacs-consult
              emacs-smartparens
              emacs-shell-command+
              emacs-avy))
      (home-page "https://github.com/eshrh/fluffy")
      (synopsis "Meow modal editing scheme optimized for qwerty")
      (description
"@code{emacs-fluffy} is a highly ergonomic qwerty modal editing scheme
for Emacs.")
      (license license:gpl3+))))

(define-public emacs-tb-keycast
  (package
    (name "emacs-tb-keycast")
    (version "1.7")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/ir33k/tb-keycast")
         (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0z62q8pr46rrq6y1kdr64y9hfz17ihqa0rznh472di54lv43cbk8"))))
    (build-system emacs-build-system)
    (home-page "https://github.com/ir33k/tb-keycast")
    (synopsis "Emacs minor mode that shows pressed keys in tab bar line")
    (description
"@code{emacs-tb-keycast} is a global minor mode showing last pressed
key with corresponding function name and repeat counter in tab-bar-mode
line.")
    (license license:gpl3+)))

(define-public emacs-vis
  (let ((commit "98703c7a42897852b25a2eba954061abe754705f")
        (revision "0"))
    (package
      (name "emacs-vis")
      (version (git-version "0.0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://git.sr.ht/~whereiseveryone/emacs-vis")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1rqzlfmk3phnsmyb7dp2f7l78h28qrmigyam01s1cp92681x5kj1"))))
      (build-system emacs-build-system)
      (propagated-inputs (list emacs-terminal-here))
      (home-page "https://git.sr.ht/~whereiseveryone/emacs-vis")
      (synopsis "emacs <3 vis")
      (description "Launch the vis editor from within emacs.")
      (license license:gpl3+))))

(define-public emacs-telephone-line
  (let ((commit "6f3455a365912e8f0c45a2240ea79507dee45ade")
        (revision "0"))
    (package
      (name "emacs-telephone-line")
      (version (git-version "0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri
          (git-reference
           (url "https://github.com/dbordak/telephone-line")
           (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1hnd6wnc52sc0ckriqnhaz64pyjk027y0dpcmh2zhpd27i8d4hmq"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/dbordak/telephone-line")
      (synopsis "Implementation of Powerline for Emacs")
      (description
"@code{emacs-telephone-line} is a new implementation of Powerline for
emacs with optional baked-in evil support, antialiased separators,
and an easy configuration language which makes it trivial to write your
own themes.")
      (license license:gpl3+))))

(define-public emacs-ipython-notebook
  (package
    (name "emacs-ipython-notebook")
    (version "20220618.1101")
    (source
     (origin
       (method url-fetch)
       (uri
         (string-append "https://melpa.org/packages/"
                        "ein-" version ".tar"))
       (sha256
        (base32
         "072hw1fx2zaqwgzyhylzvc206v04c2sqphp0fxz2k1xhk2800syk"))))
    (build-system emacs-build-system)
    (propagated-inputs
      (list emacs-anaphora
            emacs-dash
            emacs-deferred
            emacs-polymode
            emacs-request
            emacs-websocket
            emacs-with-editor))
    (home-page "https://github.com/millejoh/emacs-ipython-notebook")
    (synopsis "Jupyter notebook client in Emacs")
    (description
"Emacs IPython Notebook (EIN) provides a way to connect to instances of
a jupyter notebook as well as providing .")
    (license license:gpl3+)))

(define-public emacs-flymake-mypy
  (let ((commit "d79e158f9ed3065ab692cd0d4048aac985c4fecd")
        (revision "0"))
    (package
      (name "emacs-flymake-mypy")
      (version (git-version "0.2.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/com4/flymake-mypy")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "124pfa1kwrapwylbrvkzg3jwcmlsvfklg33ms9ki32khvglmff5h"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/com4/flymake-mypy")
      (synopsis "Flymake checker for mypy")
      (description
"This package provides Flymake support for Python static type checking
using mypy.")
      (license license:bsd-2))))

(define-public emacs-free-keys
  (package
    (name "emacs-free-keys")
    (version "1.0.0")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/Fuco1/free-keys")
         (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0xgifa7s9n882f9ymyyz9gc11xfbj3vfpnxiq1fqfm5hmwx9pwbc"))))
    (build-system emacs-build-system)
    (home-page "https://github.com/Fuco1/free-keys")
    (synopsis "Show free keybindings for modkeys or prefixes")
    (description
"@code{emacs-free-keys} shows available key bindings in the current
buffer.")
    (license license:gpl3+)))

(define-public emacs-sublimity
  ;; Latest commit was in 2020; latest tag was in 2016.
  (let ((commit "8e2ffc4d62194106130014531e7b54fc9b4b9e6c")
        (revision "0"))
    (package
      (name "emacs-sublimity")
      (version (git-version "20160629" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/zk-phi/sublimity")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0lx0kyzsjn9dhahyi3smcg6hykralrn09mnnn8x74mbpdv4alwrv"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/zk-phi/sublimity")
      (synopsis "Sublime Text-inspired minor modes for Emacs")
      (description
       "This package provides minor modes that implement features
inspired by the Sublime Text editor, including:

@enumerate
@item @code{sublimity-scroll}, smooth scrolling.
@item @code{sublimity-map}, an experimental minimap.
@item @code{sublimity-attractive}, a \"zen editing\" mode, which
removes distracting UI elements.")
      (license license:gpl2+))))

(define-public emacs-zoxide
  (package
    (name "emacs-zoxide")
    (version "1.2.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://gitlab.com/Vonfry/zoxide.el")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1fngxjd4yg73rnx9hwvkp66x972m72ysm1b7dj76fkvfdrcdz0gb"))))
    (build-system emacs-build-system)
    (arguments
     (list #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'patch-executable-variable
                 (lambda* (#:key inputs #:allow-other-keys)
                   (emacs-substitute-variables "zoxide.el"
                     ("zoxide-executable"
                      (search-input-file inputs "bin/zoxide"))))))))
    (inputs (list zoxide))
    (home-page "https://gitlab.com/Vonfry/zoxide.el")
    (synopsis "Smarter @command{cd} command for Emacs")
    (description
     "This package provides integration with @command{zoxide}
for Emacs.")
    (license license:gpl3+)))
